﻿Namespace ORM

    Public Class Transaction_ORM
        ''' <summary>
        ''' Devuelve un único Movimiento por su ID.
        ''' </summary>
        ''' <param name="idTransaction"></param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetOne(ByVal idTransaction As Integer) As WebCredit.EntityClass.Transaction_Entity
            Return Nothing
        End Function

        ''' <summary>
        ''' Devuelve todos los Movimientos.
        ''' </summary>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetAll() As System.Collections.Generic.List(Of EntityClass.Transaction_Entity)
            Return Nothing
        End Function


        ''' <summary>
        ''' Inserta un nuevo Movimiento.
        ''' </summary>
        ''' <param name="e"></param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function InsertOne(ByVal e As EntityClass.Transaction_Entity) As Integer

            Dim oDatos As New WebCredit.Datos
            Dim c As New Collection
            c.Add(Convert.ToInt64(e.Documento.id_Documento))
            c.Add(e.LetraDoc)
            c.Add(e.SucursalDoc)
            c.Add(e.NumeroDoc)
            c.Add(Convert.ToInt64(e.Persona.id_Persona))
            c.Add(e.FechaMov)
            c.Add(e.Importe)
            c.Add(e.Observaciones)
            Dim ok As Integer = 0
            ok = oDatos.EjecutarSP_INT("spMovimientosInsert", c)
            If ok < 0 Then
                'uppsss 
            End If
            c = Nothing
            oDatos = Nothing
            Return ok

        End Function

        ''' <summary>
        ''' Actualiza los datos de un único Movimiento.
        ''' </summary>
        ''' <param name="e"></param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function UpdateOne(ByVal e As EntityClass.Transaction_Entity)
            Return Nothing
        End Function


        ''' <summary>
        ''' Borra un único Movimiento.
        ''' </summary>
        ''' <param name="idTransaction"></param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function DeleteOne(ByVal idTransaction As Integer) As Integer            
            Return Nothing
        End Function
    End Class
End Namespace